import { createRouter, createWebHashHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/home',
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login/index.vue'),
  },
  {
    path: '/home',
    name: 'Home',
    meta: {
      isTabbar: true,
    },
    component: () => import('@/views/home/index.vue'),
  },
  {
    path: '/train',
    name: 'Train',
    meta: {
      isTabbar: true,
    },
    component: () => import('@/views/train/index.vue'),
  },
  {
    path: '/examine',
    name: 'Examine',
    meta: {
      isTabbar: true,
    },
    component: () => import('@/views/examine/index.vue'),
  },
  {
    path: '/my',
    name: 'My',
    meta: {
      isTabbar: true,
    },
    component: () => import('@/views/my/index.vue'),
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router
